package com.code.AZPlan.api;

import com.code.AZPlan.model.bo.*;
import com.code.AZPlan.model.po.*;
import com.code.commons.service.CrudService;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * AZ计划静态收益服务实现
 *
 * @author tangyifei
 * @since 2019年12月20日17:40:37
 */
public interface AZPlanStaticIncomeService extends CrudService<AZPlanBalance, String> {

    void reloadAccountTree();

    MoneyTransferRecord moneyTransfer(MoneyTransferRecord moneyTransferRecord);

    EntryMoneyBO entryMoney(EntryMoneyBO entryMoneyBO) throws Exception;

    AZPlanBalance getAZPlanBalanceByUserId(String userId);

    MoneyTransferRecord getMoneyTransferByUserIdAndCoinType(String userId, String coinType, String coinAddress, Integer transferType);

    Map<String, Object> getOrePool(String userId, String coinType);

    BigDecimal getTotalIncomeAmount(String userId);

    ExchangeFlow insertExchangeFlow(ExchangeFlow exchangeFlow);

    BigDecimal getTotalXWCAmount(String userId);

    BigDecimal getTotalBTCAmount(String userId);

    BigDecimal getTotalMoneyTransferAmount(String userId, String coinType, Integer transferType);

    BigDecimal getTotalExchangeAmount(String userId, String coinType);

    BigDecimal getTotalWalletAmount(String userId, String coinType);

    Map<String, Object> getIncomes(String userId, Integer page, Integer pageSize) throws Exception;

    Map<String, Object> getUsdBills(String userId, String coinType, Integer page, Integer pageSize);

    void generateStaticIncome();

    void publishNotice();

//    void updateRecommendOrePoolAndWallet();

    AZPlanWallet getAZPlanWallet(String userId, String coinType);

    List<TransferInOutFlow> getTransferInOutFlowList(String userId, String coinType, Integer flowType);

    int withdraw(WithdrawOrder withdrawOrder);

    List<WithdrawOrder> getWithdrawOrderList(String userId, String coinType);

    List<UserRelativeVersionBO> getUserRelativeVersionBOList(String userId);

    List<AZPlanBalance> getUserOrePoolVersionList();

    List<EntryMoneyFlow> getEntryMoneyFlowList();

    WithdrawBO getWithdrawList(WithdrawBO withdrawBO);

    WithdrawOrder getWithdrawOrder(String id);

    int updateWithdrawOrder(WithdrawOrder withdrawOrder);

    String manualPrintMemoryTree(String userId);

    BigDecimal getAllChildAccountTotalEntryAmount(String userId);

    Map<String, Object> getIndirectRecommends(String userId, Integer entryMoneyState, Integer page, Integer pageSize);

    RechargeTranBO getDepositList(RechargeTranBO rechargeTranBO);

    UserAssetBO getUserAssetList(UserAssetBO userAssetBO);

    void markInnerUser(String userId);

    EntryMoneyFlowBO getEntryMoneyFlowList(EntryMoneyFlowBO entryMoneyFlowBO);

    ExchangeFlowBO getExchangeFlowList(ExchangeFlowBO exchangeFlowBO);

    IncomeStatisticsDailyBO getIncomeStatisticsList(IncomeStatisticsDailyBO incomeStatisticsDailyBO);

    IncomeStatisticsDailyBO getIncomeDetailList(IncomeStatisticsDailyBO incomeStatisticsDailyBO);

    int inSiteTransfer(InSiteUserBO inSiteUserBO);

    int addAzNotice(AzNotice azNotice);

    int updateAzNotice(AzNotice azNotice);

    AzNotice getAzNoticeById(String id);

    AzNoticeBO getAzNoticeList(AzNoticeBO azNoticeBO);

    int upDownAzNotice(AzNotice azNotice);

    BigDecimal getFrozenAmount(String userId, String coinType);

}
